#pragma once

#ifndef REGEX_FILE_FILTER
#define REGEX_FILE_FILTER

/*! \file RegexFileFilter.h
	\brief Header file for RegexFileFilter class.
	
	Details.
*/

#include "boost/regex.hpp"

#include "FileType.h"
#include "AbstractFileFilter.h"

namespace analyzer {

	//! This class is used for checking file names with regular expresions.
	class RegexFileFilter : public AbstractFileFilter
	{
	public:	
		/*! \fn RegexFileFilter(std::string pattern, FileType fileType)
			\brief Constructor of class RegexFileFilter
			\param pattern
			\param fileType
		*/
		RegexFileFilter(std::string pattern, FileType fileType);
		
		/*! \fn ~RegexFileFilter(void)
			\brief Destructor of class RegexFileFilter
		*/
		~RegexFileFilter(void);
		
		/*! \fn FileType getFileType() const
			\brief Method returns type of file 
			\return 
		*/
		FileType getFileType() const;

		/*! \fn virtual FileMatch acceptFile(std::string fileName)
			\brief This funcion checks the file with regex filter.
			\param fileName Is the name of file which is checking of acceptable by file filter.
			\return FileMatch object with sets parameters (matched and file type).
		*/
		virtual FileMatch acceptFile(std::string fileName);
	private: 

		boost::regex regex;
		FileType fileType;
	};

}

#endif // REGEX_FILE_FILTER